//
//  OAIpdataBase.h
//  LongOA
//
//  Created by 耿用强 on 15/7/9.
//  Copyright (c) 2015年 耿用强. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LJClientPool.h"
#import "OASet.h"

#define kIp   @"kip"
#define kPort @"kPort"
#define kaccounts @"kaccounts"
@interface OAIpdataBase : NSObject
+ (void)saveIpandPortData:(NSDictionary*)data;
+ (NSArray*)getIpandPortData;

+(OAIpdataBase*)shareInstance;

// 添加服务器 Tcp服务器、http服务器、中转服务器
-(int)AddServiceWithIP:(NSString*)ip AndPort:(int)port AndAccounts:(NSArray*) accounts;
-(int)AddServiceWithUrl:(NSString*)url;
-(int)AddServiceWithCusid:(NSString*)cusid;
// 获取服务器连接池
-(LJClientPool*)getPool:(int)setid;
// 获取已登陆账套
-(void)initAccounts;
-(NSArray*)allAccounts;
-(NSArray*)loginAccounts;

-(OASet*)getSet:(int)setid;
@end

@interface Module : NSObject
@property (nonatomic) int id;
@property (nonatomic,copy) NSString* name;
-(instancetype) initWithID:(int) id andName:(NSString*) name;
@end
